</div><!-- ./wrapper -->

<!-- jQuery 2.0.2 -->
<script src="<?php echo base_url(); ?>asset/js/jquery.min.js"></script>
<!-- Bootstrap -->
<script src="<?php echo base_url(); ?>asset/js/bootstrap.min.js" type="text/javascript"></script>
<!-- AdminLTE App -->
<script src="<?php echo base_url(); ?>asset/js/AdminLTE/app.js" type="text/javascript"></script>
<!-- AdminLTE for demo purposes -->
<script src="<?php echo base_url(); ?>asset/js/AdminLTE/demo.js" type="text/javascript"></script>

<link href="<?php echo base_url(); ?>asset/css/datepicker/datepicker3.css" rel="stylesheet" type="text/css" />

<script src="<?php echo base_url(); ?>asset/js/plugins/datepicker/bootstrap-datepicker.js"></script>

<link href="<?php echo base_url(); ?>asset/css/bootstrap-select/bootstrap-select.css" rel="stylesheet" type="text/css" />

<script src="<?php echo base_url(); ?>asset/js/plugins/bootstrap-select/bootstrap-select.js"></script>

<script type="text/javascript">
    $(function() {
        $("#in_tanggal").datepicker({
            format: 'mm/dd/yyyy'
        });
        $('.selectpicker').selectpicker();
        
        $('#in_sub_kasus, #in_sub_kasus_label').hide();
        $('#in_kat_kasus').change(function(){
            var state_id = $('#in_kat_kasus').val();
           
            if (state_id != ""){
                var post_url = "<?php echo base_url(); ?>index.php/kasuss/get_sub_kasus_from_kat_id/" + state_id;
                $.ajax({
                    type: "POST",
                    url: post_url,
                    success: function(kat_kasus) //we're calling the response json array 'cities'
                    {
                        $('#in_sub_kasus').empty();
                        $('#in_sub_kasus, #in_sub_kasus_label').show();
                        //alert(kat_kasus);
                        $.each(kat_kasus, function(id,nama) 
                        {
                            var opt = $('<option />'); // here we're creating a new select option for each group
                            opt.val(id);
                            opt.text(nama);
                            $('#in_sub_kasus').append(opt); 
                        });
                    } //end success
                }); //end AJAX
            } else {
                $('#in_sub_kasus').empty();
                $('#in_sub_kasus, #in_sub_kasus_label').hide();
            }//end if
        }); //end change  
        
    });
</script>

</body>
</html>